<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		ScriptPlanet.eu															/
/	Site:			http://www.scriptplanet.eu												/
/	Email:			support@scriptplanet.eu													/
/	Support:		http://www.scriptplanet.eu/support										/
/	Copyright:		2011 (c) ScriptPlanet.eu												/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0001																	/
/																							/
/========================================== JooSam ========================================*/
// Joomla security
defined('_JEXEC') or die;

## Import Joomla Data
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>

<script>
	Joomla.submitbutton = function(task){ if (task == 'setting.cancel' || document.formvalidator.isValid(document.id('setting-form'))){ Joomla.submitform(task, document.getElementById('setting-form')); } else{ alert("<?php echo JText::_('COM_JOOSAM_JSCRIPT_NOFIL'); ?>");} return false; }
</script>

<form action="<?php echo JRoute::_('index.php?option=com_joosam&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="setting-form" class="form-validate">
	<table>
		<tbody>
			<tr>
				<td style="height:200px;">
					<fieldset class="panelform jsamLegend" style="height:100%;">
						
						<legend><?php echo JText::_('COM_JOOSAM_VIEW_SETTINGS_MYSQL_TITLE'); ?></legend>
						<ul class="adminformlist" style="height:100%;">
							<?php foreach($this->form->getFieldset('mysql') as $field): ?>
							<li style="margin:0;padding:0;min-height:26px;"><?php echo $field->label;echo $field->input;?></li>
							<?php endforeach; ?>
						</ul>
					</fieldset>
				</td>
				<td style="height:200px;">
					<fieldset class="panelform jsamLegend" style="height:100%;">
						
						<legend><?php echo JText::_('COM_JOOSAM_VIEW_SETTINGS_IMG_TITLE'); ?></legend>
						<ul class="adminformlist" style="height:100%;">
							<?php foreach($this->form->getFieldset('pictures') as $field): ?>
							<li style="margin:0;padding:0;min-height:26px;"><?php echo $field->label;echo $field->input;?> <span style="margin:0;padding:0;" id="js_<?php echo $field->id; ?>"></span></li>
							<?php endforeach; ?>
						</ul>
					</fieldset>
				</td>
				<td style="height:200px;">
					<fieldset class="panelform jsamLegend" style="height:100%;">
						
						<legend><?php echo JText::_('COM_JOOSAM_VIEW_SETTINGS_SAMSRV_TITLE'); ?></legend>
						<ul class="adminformlist" style="height:100%;">
							<?php foreach($this->form->getFieldset('sam') as $field): ?>
							<li style="margin:0;padding:0;min-height:26px;"><?php echo $field->label;echo $field->input;?></li>
							<?php endforeach; ?>
						</ul>
					</fieldset>
				</td>
			</tr>
		</tbody>
		<tfoot></tfoot>
	</table>
	<div>
		<input type="hidden" name="task" value="" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
	<div class="clr"></div>
</form>
<div class="clr"></div>
<!-- If you have respect for scriptplanet.eu you don't delete the code below -->
<div class="spCopyFooter" style="padding:0;margin:0 auto;font-size:9px;width:220px;text-align:center;"><span>JooSam created by</span><a href="http://www.scriptplanet.eu">ScriptPlanet.eu</a><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/"><img alt="Creative Commons Licentie" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/80x15.png" /></a></div>

<script>
	document.getElementById('js_jform_imgheight').innerHTML = '&nbsp;px'; document.getElementById('js_jform_imgwidth').innerHTML = '&nbsp;px'; document.getElementById('jform_imgwidth').setAttribute("onkeypress", "return onlyNumbers(event)"); document.getElementById('jform_imgheight').setAttribute("onkeypress", "return onlyNumbers(event)"); function onlyNumbers(e){ var keynum; var keychar; var numcheck; if(window.event){ keynum = e.keyCode; } else if(e.which){ keynum = e.which; } keychar = String.fromCharCode(keynum); numcheck = /\d/; return numcheck.test(keychar); }
</script>